/**
 * Reset some basic elements
 */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
hr,
dl,
dd,
ol,
ul,
figure {
    margin: 0;
    padding: 0;
}

html {
    min-width: $on-mobile-old;
}

/**
 * Basic styling
 */
body {
    font: $base-font-weight #{$base-font-size}/#{$base-line-height}
        $base-font-family;
    color: $text-color;
    background-color: $background-color;
    -webkit-text-size-adjust: 100%;
    -webkit-font-feature-settings: 'kern' 1;
    -moz-font-feature-settings: 'kern' 1;
    -o-font-feature-settings: 'kern' 1;
    font-feature-settings: 'kern' 1;
    font-kerning: normal;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/**
 * `main` element
 */
main {
    display: block; /* Default value of `display` of `main` element is 'inline' in IE 11. */
}

/**
 * Images
 */
img {
    max-width: 100%;
    vertical-align: middle;
}

/**
 * Figures
 */
figure > img {
    display: block;
}

figcaption {
    font-size: $small-font-size;
}

/**
 * Lists
 */

li {
    > ul,
    > ol {
        margin-bottom: 0;
    }
}

/**
 * Headings
 */
h1,
h2,
h3,
h4 {
    font-family: $header-font-family;
}

h5,
h6 {
    font-family: $base-font-family;
    font-weight: $base-font-weight;
}

h1 {
    font-weight: $title-font-weight;
}

/**
 * Links
 */
a:not(.table-of-contents a, .getting_started_card a, footer a, .button-mono, .cta-link, .border-b) {
    color: #23907E;
    text-decoration: none;
    font-weight: 600;

    &:hover {
        text-decoration: underline;
    }

    .social-media-list &:hover {
        text-decoration: none;

        .username {
            text-decoration: underline;
        }
    }
}

/**
 * Blockquotes
 */
blockquote {
    color: $grey-medium;
    border-left: 4px solid $grey-light;
    padding-left: $spacer-xl / 2;
    @include relative-font-size(1.125);
    letter-spacing: -1px;
    font-style: italic;

    > :last-child {
        margin-bottom: 0;
    }
}

/**
 * Code formatting
 */
pre,
code {
    font-family: "IBM Plex Mono";
    margin: $spacer-xl 0;

}

code {
    padding: 4px 6px;
    background: $green-pastel;
    color: $green-darkest;
    border: 1px solid #B4F3C9;
    border-radius: 4px;
}

pre {
    padding: 20px;
    overflow-x: auto;
    border-radius: $radius;

    > code {
        border: 0;
        padding-right: 0;
        padding-left: 0;
        background: none;
        color: $code-default;
    }
}

/**
 * Wrapper
 */

/**
 * Clearfix
 */
%clearfix:after {
    content: '';
    display: table;
    clear: both;
}

/**
 * Icons
 */

.svg-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    fill: #{$grey-medium};
    padding-right: 5px;
    vertical-align: text-top;
}

.social-media-list {
    li + li {
        padding-top: 5px;
    }
}

/**
 * Tables
 */
table {
    margin-bottom: $spacer-xl;
    width: 100%;
    text-align: $table-text-align;
    color: $text-color;
    // color: lighten($text-color, 18%);
    border-collapse: collapse;
    border: 1px solid $grey-light;
    &:not(.no-alternate) tr {
        &:nth-child(even) {
            background-color: $green-lightest;
        }
    }
    th,
    td {
        padding: ($spacer-xl / 3) ($spacer-xl / 2);
    }
    th {
        background-color: lighten($grey-light, 3%);
        border: 1px solid darken($grey-light, 4%);
        border-bottom-color: darken($grey-light, 12%);
    }
    td {
        border: 1px solid $grey-light;
        vertical-align: top;
    }
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}
